package com.len.test.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * ???????
 * </p>
 *
 * @author lixin40
 * @since 2018-09-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
public class SysUser extends Model<SysUser> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * ???
     */
    private String username;
    /**
     * ??
     */
    private String password;
    /**
     * ???token
     */
    @TableField("remember_token")
    private String rememberToken;
    /**
     * ????
     */
    @TableField("real_name")
    private String realName;
    /**
     * ??:0:?,1:?
     */
    private Integer sex;
    /**
     * ????ip
     */
    @TableField("allow_ip")
    private String allowIp;
    /**
     * ?????1: ???????2: ldap??
     */
    @TableField("auth_type")
    private Integer authType;
    /**
     * ??
     */
    private String email;
    /**
     * ??
     */
    @TableField("mobile_phone")
    private String mobilePhone;
    /**
     * ??:0???1??
     */
    @TableField("is_valid")
    private Integer isValid;
    /**
     * ??????
     */
    @TableField("last_login_time")
    private Date lastLoginTime;
    /**
     * ????
     */
    @TableField("created_at")
    private Date createdAt;
    /**
     * ????
     */
    @TableField("updated_at")
    private Date updatedAt;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
